import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';
//单条查询
export const queryBizQuestionSendList = (params) => {
  params.head.transCode = 'queryBizQuestionSendList';
  return request({
    url: '/biz/question/bizQuestionSendList/queryBizQuestionSendList',
    method: 'post',
    data: params
  })
}
//多条列表查询，支持条件查询
export const queryBizQuestionSendListListPage = (params) => {
  params.head.transCode = 'queryBizQuestionSendListListPage';
  return request({
    url: '/biz/question/bizQuestionSendList/queryBizQuestionSendListListPage',
    method: 'post',
    data: params
  })
}
//新增单条记录
export const saveBizQuestionSendList = (params) => {
  params.head.transCode = 'saveBizQuestionSendList';
  return request({
    url: '/biz/question/bizQuestionSendList/saveBizQuestionSendList',
    method: 'post',
    data: params
  })
}
//新增多条记录
export const saveBizQuestionSendListList = (params) => {
  params.head.transCode = 'saveBizQuestionSendListList';
  return request({
    url: '/biz/question/bizQuestionSendList/saveBizQuestionSendListList',
    method: 'post',
    data: params
  })
}
//新增或修改单条记录
export const saveOrUpdateBizQuestionSendList = (params) => {
  params.head.transCode = 'saveOrUpdateBizQuestionSendList';
  return request({
    url: '/biz/question/bizQuestionSendList/saveOrUpdateBizQuestionSendList',
    method: 'post',
    data: params
  })
}


//新增或修改单条记录
export const saveOrUpdateBizQuestionSendListList = (params) => {
  params.head.transCode = 'saveOrUpdateBizQuestionSendListList';
  return request({
    url: '/biz/question/bizQuestionSendList/saveOrUpdateBizQuestionSendListList',
    method: 'post',
    data: params
  })
}

//修改单条记录
export const updateBizQuestionSendList = (params) => {
  params.head.transCode = 'updateBizQuestionSendList';
  return request({
    url: '/biz/question/bizQuestionSendList/updateBizQuestionSendList',
    method: 'post',
    data: params
  })
}

//删除单条记录
export const deleteBizQuestionSendList = (params) => {
  params.head.transCode = 'deleteBizQuestionSendList';
  return request({
    url: '/biz/question/bizQuestionSendList/deleteBizQuestionSendList',
    method: 'post',
    data: params
  })
}

//删除多条记录
export const deleteBizQuestionSendListList = (params) => {
  params.head.transCode = 'deleteBizQuestionSendListList';
  return request({
    url: '/biz/question/bizQuestionSendList/deleteBizQuestionSendListList',
    method: 'post',
    data: params
  })
}
//导出excel
export const exportBizQuestionSendListExcel = (params) => {
  downloadExcel({
    url: '/biz/question/bizQuestionSendList/excelDownload/exportBizQuestionSendListExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
